const {ccclass, property} = cc._decorator;

@ccclass
export default class Tab_Button extends cc.Component {
    isSelect: boolean = false;

    @property(cc.Label)
    lblText: cc.Label = null;

    setIsSelect(isSelect){
        this.isSelect = isSelect;
        this._updateLblText();
    }

    private _updateLblText(){
        let scale = this.isSelect ? 1.2 : 1;
        this.lblText.node.setScale(scale);
        if(this.isSelect){
            this.lblText.node.color = new cc.Color(255, 0, 0, 255);
        }else{
            this.lblText.node.color = new cc.Color(118, 118, 118, 255);
        }
    }
}
